Java™ is a programming language that, at the source code level, is similar to object oriented programming languages such as C++. Java language source code is compiled into an intermediate representation based on a plurality of “bytecodes” that define specific actions. In some implementations, the bytecodes are further compiled to machine language for a particular processor. In order to speed the execution of Java language programs, some processors are specifically designed to execute some of the Java bytecodes directly. Many times, a processor that directly executes Java bytecodes is paired with a general purpose processor to accelerate Java program execution.
Moreover, threads may be used to concurrently perform different tasks within the same processor. A thread may be generically defined as an independent flow of control or stream of execution within an executing application. A thread may comprise a context (e.g., a program counter and a register set) and an instruction sequence that can be executed independently of other instruction sequences. The Java programming language specification provides a thread API, java.lang.thread, that may be used to implement multiple threads of execution within a Java program, and imposes a minimum priority-based thread scheduling policy on implementations of the Java Virtual Machine (JVM). In many JVM implementations, Java threads are implemented on the native threading model of a non-Java operating system and the scheduler of the operating system controls the scheduling of the Java threads.